import { ref } from 'vue'
import { defineStore } from 'pinia'

export const useGlobalStore = defineStore('globalConfig', () => {
  const params = new URLSearchParams(window.location.search);
  const bffToken = params.get('token') ? ref(params.get('token')) : ref("")
  const application = ref({
    sceneName: '', // 场景名称
    sceneId: '', // 场景id
    boardName: '', // 看板名称
    boardId: '', // 看板id
    status: false, // 发布状态
  })
  return { bffToken, application }
},{
  persist: true
})
